﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"                    
                    xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
                    xmlns:myControls="clr-namespace:C4Net.Framework.MVVM"
                    xmlns:System="clr-namespace:System;assembly=mscorlib"
                    xmlns:Converters="clr-namespace:MahApps.Metro.Converters;assembly=MahApps.Metro">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
        <ResourceDictionary>
            <Style TargetType="{x:Type TextBox}" 
                   x:Key="OpenFileMetroTextBox" 
                   BasedOn="{StaticResource ButtonCommandMetroTextBox}">
                <Setter Property="Controls:TextboxHelper.ButtonTemplate">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <Grid Background="{TemplateBinding Background}">
                                <Grid x:Name="contentPresenter"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    Margin="{TemplateBinding Padding}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                    Opacity="0.75">
                                    <Canvas Width="15"
                                        Height="15"
                                        Clip="F1 M 0,0L 48,0L 48,48L 0,48L 0,0">
                                        <Path Width="15.7781"
                                            Height="15.7781"
                                            Stretch="Fill"
                                            Fill="{TemplateBinding Foreground}"
                                            Data="F1 M 16.6668,20L 13,28.5336L 13,16L 23,16L 23,15C 23,13.8954 23.8954,13 25,13L 32,13C 33.1046,13 35,14.8954 35,16L 35,20L 16.6668,20 Z M 35,32L 28,32L 13,32L 17.5833,21L 39.5833,21L 35,32 Z " />
                                    </Canvas>
                                </Grid>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver"
                                    Value="True">
                                    <Setter TargetName="contentPresenter"
                                        Property="Opacity"
                                        Value="1" />
                                </Trigger>
                                <Trigger Property="IsMouseOver"
                                    Value="False">
                                    <Setter TargetName="contentPresenter"
                                        Property="Opacity"
                                        Value=".5" />
                                </Trigger>
                                <Trigger Property="IsEnabled"
                                    Value="false">
                                    <Setter Property="Foreground"
                                        Value="#ADADAD" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <SolidColorBrush x:Key="Gray" Color="#333333" />
        </ResourceDictionary>
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>